package com.dragon.datastructure.queue;

/**
 * 优先队列测试
 *
 * @author dragon
 * @since 2020/1/1
 */
public class PriorityQueueTest {

    public static void main(String[] args) {
        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
        int count = 10;
        for (int i = 0; i < count; i++) {
            priorityQueue.enqueue((int) (Math.random() * 100));
        }

        while (!priorityQueue.isEmpty()) {
            System.out.println(priorityQueue.dequeue());
        }
    }
}
